#include"graph.h"
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i(a);i<=(b);++i)
using namespace std;
int vis[201],cnt=1;
int dis[201][201];
inline int _NumberOfRoads()
{
//	cout<<"calling NumberOfRoads"<<endl;
	int res=NumberOfRoads();
//	cout<<"NumberOfRoads="<<res<<endl;
	return res;
}
inline void _Move(int x,int y)
{
//	cout<<"calling Move "<<x<<' '<<y<<endl;
	Move(y,x);
//	cout<<"Move "<<x<<' '<<y<<endl;
}
void dfs(vector<int> pres,int Col)
{
	cerr<<Col<<endl;
	int tot=_NumberOfRoads();
	rep(i,1,tot)
	{
		_Move(Col,i);
		int CurrentColor=Color(),lstrd=LastRoad();
		if(CurrentColor==1) // not visited
		{
			CurrentColor=++cnt;
			pres.emplace_back(LastRoad());
			dfs(pres,CurrentColor);
		}
		_Move(CurrentColor,lstrd);
		dis[Col][CurrentColor]=dis[CurrentColor][Col]=1;
	}
}
void Inspect(int R)
{
	dfs({},++cnt);
	rep(k,2,cnt) rep(i,2,cnt) rep(j,2,cnt) dis[i][j]=min(dis[i][j],dis[i][k]+dis[k][j]);
	vector<int> ans(R+1);
	rep(i,2,cnt) rep(j,2,cnt)
	{
	//	cout<<"distance "<<i<<' '<<j<<' '<<dis[i][j]<<endl;
		if(dis[i][j]<=R) ++ans[dis[i][j]];
	}
	rep(i,1,R) Answer(i,ans[i]);
}
